<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>定位</title>
        <style>
            div{
                width:200px;
                height:100px;
                margin:5px 5px;
                padding:10px;
                background-color: #eafc8f;
                border:1px solid red;
            }
            #pos2{
               position:relative;
               top:10px;
               left:20px;
            }
        </style>
    </head>
    <body>
        <div id="pos1">块元素1</div>
        <div id="pos2">块元素2</div>
        <div id="pos3">块元素3</div>
    </body>
</html>